package com.lxj.security.controller;

import com.lxj.security.entity.User;
import com.lxj.security.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/test")
public class TestController {
    @Autowired
    UserService userService;

    @PostMapping("/hello")
    public String hello(){
        return "welcome";
    }
    @GetMapping("find")
    public User findAll(@RequestBody Integer id){
        return userService.findAll(id);
    }
}
